<Project>

	<PropertyGroup>
		<AbovePropsFile>$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))</AbovePropsFile>
		<AboveLocalPropsFile>$([MSBuild]::GetPathOfFileAbove('Local.Build.props', '$(MSBuildThisFileDirectory)../'))</AboveLocalPropsFile>
	</PropertyGroup>

	<Import Project="$(AbovePropsFile)" Condition="Exists('$(AbovePropsFile)')" />
	<Import Project="$(AboveLocalPropsFile)" Condition="Exists('$(AboveLocalPropsFile)')" />

	<PropertyGroup>
		<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
	</PropertyGroup>

	<PropertyGroup>
		<VersionPrefixDefault>1.0.0</VersionPrefixDefault>
		<VersionPrefix>$(VersionPrefixDefault)</VersionPrefix>
		<VersionPrefixFile>$(MSBuildProjectDirectory)\VersionPrefix.txt</VersionPrefixFile>
		<VersionPrefix Condition="Exists('$(VersionPrefixFile)')" >$([System.IO.File]::ReadAllText($(VersionPrefixFile)))</VersionPrefix>
	</PropertyGroup>

	<PropertyGroup>
		<VersionSuffixDefault>-dev</VersionSuffixDefault>
		<VersionSuffix>$(VersionSuffixDefault)</VersionSuffix>
		<VersionSuffixFile>$(MSBuildProjectDirectory)\VersionSuffix.txt</VersionSuffixFile>
		<VersionSuffix Condition="Exists('$(VersionSuffixFile)')" >$([System.IO.File]::ReadAllText($(VersionSuffixFile)))</VersionSuffix>
	</PropertyGroup>

	<PropertyGroup>
		<BuildNumberDefault>0</BuildNumberDefault>
		<BuildNumber Condition="'$(BuildNumber)'==''">$(BuildNumberDefault)</BuildNumber>
		<BuildNumberFile>$(MSBuildProjectDirectory)\BuildNumber.txt</BuildNumberFile>
		<BuildNumber Condition="Exists('$(BuildNumberFile)')" >$([System.IO.File]::ReadAllText($(BuildNumberFile)))</BuildNumber>
	</PropertyGroup>

	<PropertyGroup>
		<Version>$(VersionPrefix).$(BuildNumber)</Version>
	</PropertyGroup>

	<PropertyGroup>
		<AssemblyVersion>$(Version)</AssemblyVersion>
		<FileVersion>$(Version)</FileVersion>
		<InformationalVersion>$(Version)$(VersionSuffix)</InformationalVersion>
		<ProductVersion>$(Version)$(VersionSuffix)</ProductVersion>
	</PropertyGroup>

	<PropertyGroup>
		<PackageVersion>$(Version)</PackageVersion>
		<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
	</PropertyGroup>

	<PropertyGroup>
		<CurrentYear>$([System.DateTime]::Now.ToString(yyyy))</CurrentYear>
		<Company>KSoft</Company>
		<ProductName>Bpmn.Xml</ProductName>
		<Product>$(ProductName)</Product>
		<Copyright>©$(Company) 2024-$(CurrentYear)</Copyright>
	</PropertyGroup>

	<PropertyGroup>
		<LangVersion>latest</LangVersion>
		<SuppressNETCoreSdkPreviewMessage>true</SuppressNETCoreSdkPreviewMessage>
		<ErrorOnDuplicatePublishOutputFiles>false</ErrorOnDuplicatePublishOutputFiles>
		<DocumentationFile>$(MSBuildProjectDirectory)\$(MSBuildProjectName).doc.xml</DocumentationFile>
	</PropertyGroup>

	<PropertyGroup Condition="!$(MsBuildProjectName.EndsWith('.Tests'))">
		<ServerGarbageCollection>true</ServerGarbageCollection>
		<ConcurrentGarbageCollection>true</ConcurrentGarbageCollection>
	</PropertyGroup>

	<ItemGroup>
		<None Include="$(DocumentationFile)" Visible="false" Condition="Exists('$(DocumentationFile)')">
			<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
		</None>
	</ItemGroup>

	<PropertyGroup>
		<EnvironmentName>Development</EnvironmentName>
		<EnvironmentName Condition=" '$(Configuration)' == 'Release'">Production</EnvironmentName>
	</PropertyGroup>

	<ItemGroup>
		<Content Condition="Exists('$(MSBuildProjectDirectory)/.locals/appsettings.$(ProjectName).json')"
				 Include="$(MSBuildProjectDirectory)/.locals/appsettings.$(ProjectName).json"
				 Link="%(Filename)%(Extension)">
			<DependentUpon>appsettings.json</DependentUpon>
			<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
		</Content>
		<Content Condition="Exists('$(MSBuildProjectDirectory)/.locals/appsettings.$(EnvironmentName).json')"
				 Include="$(MSBuildProjectDirectory)/.locals/appsettings.$(EnvironmentName).json"
				 Link="%(Filename)%(Extension)">
			<DependentUpon>appsettings.json</DependentUpon>
			<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
		</Content>
	</ItemGroup>

	<Import Condition="Exists('$(MSBuildProjectDirectory)/.locals/.locals.props')" Project="$(MSBuildProjectDirectory)/.locals/.locals.props"/>

</Project>
